/*******************************************************************************
 * Copyright (c) 2002 Boris Pruessmann and others.
 * All rights reserved.   This program and the accompanying materials
 * are made available under the terms of the Common Public License v0.5
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v05.html
 * 
 * Contributors:
 *    Boris Pruessmann - Initial implementation.
 ******************************************************************************/
package net.sourceforge.perforce.core.syncinfo;

import org.eclipse.core.resources.IResource;

/**
  * @version $Revision: 77 $
  * @author  <a href="mailto:bpruessmann@users.sourceforge.net">Boris Pruessmann</a>
  */
public interface IResourceStateDelta 
{
	// ----------------------------------------------------------------------------------- Constants
	
	/** resource state was added. */ 
	int ADDED = 1;
	/** resource state has changed. */
	int CHANGED = 2;
	/** resource state was removed. */
	int REMOVED = 3;
	
	// ------------------------------------------------------------------------------------- Methods
	
	/** Returns the type of change. Is either ADDED, CHANEGD or REMOVED. 
	  * 
	  * @return the type of change.
	  */
	int getKind();
	
	/** Returns the resource for which the state has changed.
	  *
	  * @return the resource. 
	  */
	IResource getResource();
	
	/** Call this method to retrieve the new resource state. 
	  *
	  * @return the new resource state. 
	  */
	ResourceSyncInfo getNewResourceSyncInfo();
	
	/** Call this method to retrieve the old resource state.
	  *
	  * @return the old resource state. 
	  */
	ResourceSyncInfo getOldResourceSyncInfo();
}